package com.huishi.entity.vo;

import lombok.Data;

import java.util.Objects;

/**
 * 上传文件时的信息vo
 */
@Data
public class UploadMsgVO {
    private String taskName;
    private int process;
    private int fileNums;
    private String fileTotalSize;
    private String speed;
    private String takeTime;
    private String leftTime;
    private String userName;

    public UploadMsgVO() {
    }

    public UploadMsgVO(String taskName, int process, int fileNums, String fileTotalSize, String leftTime) {
        this.taskName = taskName;
        this.process = process;
        this.fileNums = fileNums;
        this.fileTotalSize = fileTotalSize;
        this.leftTime = leftTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UploadMsgVO that = (UploadMsgVO) o;
        return process == that.process && fileNums == that.fileNums && taskName.equals(that.taskName) && fileTotalSize.equals(that.fileTotalSize) && speed.equals(that.speed) && takeTime.equals(that.takeTime) && leftTime.equals(that.leftTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(taskName, process, fileNums, fileTotalSize, speed, takeTime, leftTime);
    }
}
